package com.jdym.back.service.impl;

import com.jdym.back.entity.Firm;
import com.jdym.back.entity.Message;
import com.jdym.back.entity.vo.MessageManage;
import com.jdym.back.mapper.MessageMapper;
import com.jdym.back.service.MessageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 留言反馈 服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2021-09-20
 */
@Service
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {
@Autowired
MessageMapper messageMapper;


    @Override
    public List<MessageManage> getAllFirmMsg() {
       return messageMapper.getAllFirmMsg();
    }

    @Override
    public List<MessageManage> getFirmMsgDetail(int id) {
        return messageMapper.getFirmMsgDetail(id);
    }

    @Override
    public int insertReply(String reply) {
        return 0;
    }

    @Override
    public List<MessageManage> findMsgByLoan(int loanId) {
       return messageMapper.findMsgByLoan(loanId);
    }

    @Override
    public List<Firm> getFirmMsg() {

        return messageMapper.getFirmMsg();
    }

    @Override
    public List<MessageManage> getFirmMsgByfirmId(int firmId) {
        return messageMapper.getFirmMsgByfirmId(firmId);
    }


    @Override
    public List<Message> selectAll(int bankId) {
        return messageMapper.selectAll(bankId);
    }

    @Override
    public Message selectID(int mid) {
        return messageMapper.selectID(mid);
    }
}
